#:kivy 1.0.9
#:import DisableableButton ui.disableable_button.DisableableButton

<AddPlayerScreen>:
    to_add_button: to_add_button
    text_input: text_input
    BoxLayout:
        orientation: 'vertical'
        size: root.size
        BoxLayout:
            orientation: 'horizontal'
            size_hint_y: None
            height: root.height*0.1
            Button:
                color: 1,0,0,1
                text: _('Back')
                on_release: root.go_back()
            DisableableButton:
                color: [0,1,0,1] if self.enabled else [1,1,1,1]
                id: to_add_button
                text: _('Next')
                on_release: root.on_add_user_pressed()
        TextInput:
            id: text_input
            size_hint_y: 0.4
            text: root.player_name
            on_text: root.update_name(args[1])
            multiline: False
            on_text_validate: root.on_add_user_pressed()
            focus: True
            font_size: 0.6*self.height
        Label:
            text: _('Player name')
        Label:
        Label:


